#!/bin/bash

dname=$1

atod=
if [ "$2" == "atod" ]; then
    atod=a
fi

info="\
0.1 \
0.2 \
0.3 \
0.4 \
0.5 \
0.6 \
0.7 \
0.8 \
0.9 \
0.11 \
0.101 \
0.1001 \
0.10001 \
0.100001 \
0.1000001 \
0.10000001 \
0.100000001 \
0.1000000001 \
0.10000000001 \
0.100000000001 \
0.1000000000001 \
0.10000000000001 \
0.100000000000001 \
0.1000000000000001 \
1.1 \
2.2 \
3.3 \
4.4 \
5.5 \
6.6 \
7.7 \
8.8 \
9.9 \
0.1 \
0.12 \
0.123 \
0.1234 \
0.12345 \
0.123456 \
0.1234567 \
0.12345678 \
0.123456789 \
0.12345678901 \
0.123456789012 \
0.1234567890123 \
0.12345678901234 \
0.123456789012345 \
0.1234567890123456 \
0.1e100 \
0.12e100 \
0.123e100 \
0.1234e100 \
0.12345e100 \
0.123456e100 \
0.1234567e100 \
0.12345678e100 \
0.123456789e100 \
0.12345678901e100 \
0.123456789012e100 \
0.1234567890123e100 \
0.12345678901234e100 \
0.123456789012345e100 \
0.1234567890123456e100 \
0.1e-100 \
0.12e-100 \
0.123e-100 \
0.1234e-100 \
0.12345e-100 \
0.123456e-100 \
0.1234567e-100 \
0.12345678e-100 \
0.123456789e-100 \
0.12345678901e-100 \
0.123456789012e-100 \
0.1234567890123e-100 \
0.12345678901234e-100 \
0.123456789012345e-100 \
0.1234567890123456e-100 \
1e1 \
1e2 \
1e3 \
1e4 \
1e5 \
1e6 \
1e7 \
1e8 \
1e9 \
1e10 \
1e11 \
1e12 \
1e13 \
1e14 \
1e15 \
1e16 \
1e-1 \
1e-2 \
1e-3 \
1e-4 \
1e-5 \
1e-6 \
1e-7 \
1e-8 \
1e-9 \
1e-10 \
1e-11 \
1e-12 \
1e-13 \
1e-14 \
1e-15 \
1e-16 \
0.9 \
0.99 \
0.999 \
0.9999 \
0.99999 \
0.999999 \
0.9999999 \
0.99999999 \
0.999999999 \
0.9999999999 \
0.99999999999 \
0.999999999999 \
0.9999999999999 \
0.99999999999999 \
0.999999999999999 \
0.9999999999999999 \
9.9 \
9.99 \
9.999 \
9.9999 \
9.99999 \
9.999999 \
9.9999999 \
9.99999999 \
9.999999999 \
9.9999999999 \
9.99999999999 \
9.999999999999 \
9.9999999999999 \
9.99999999999999 \
9.999999999999999 \
9.9999999999999999 \
0.1 \
0.11 \
0.111 \
0.1111 \
0.11111 \
0.111111 \
0.1111111 \
0.11111111 \
0.111111111 \
0.1111111111 \
0.11111111111 \
0.111111111111 \
0.1111111111111 \
0.11111111111111 \
0.111111111111111 \
0.1111111111111111 \
1.1 \
1.11 \
1.111 \
1.1111 \
1.11111 \
1.111111 \
1.1111111 \
1.11111111 \
1.111111111 \
1.1111111111 \
1.11111111111 \
1.111111111111 \
1.1111111111111 \
1.11111111111111 \
1.111111111111111 \
1.1111111111111111 \
1e-300 \
1e-301 \
1e-302 \
1e-303 \
1e-304 \
1e-305 \
1e-306 \
1e-307 \
1e-308 \
1e-309 \
1e-310 \
1e-311 \
1e-312 \
1e-313 \
1e-314 \
1e-315 \
1e-316 \
1e-317 \
1e-318 \
1e-319 \
1e-320 \
1e-321 \
1e-322 \
1e-323 \
1e+300 \
1e+301 \
1e+302 \
1e+303 \
1e+304 \
1e+305 \
1e+306 \
1e+307 \
1e+308 \
1e+309 \
1e+310 \
9.999999999999999 \
9.999999999999991 \
9.999999999999989 \
9.999999999999981 \
9.999999999999979 \
9.999999999999971 \
9.999999999999969 \
9.999999999999961 \
9.999999999999959 \
9.999999999999951 \
9.999999999999949 \
9.999999999999941 \
9.999999999999939 \
9.999999999999931 \
9.999999999999929 \
9.999999999999921 \
9.999999999999919 \
9.999999999999911 \
9.999999999999909 \
9.999999999999901 \
"

for i in $info; do
    ./$dname/jnum_test $atod $i 10000000 | sed -e 's/: /:| `/g' -e 's/$/`/g' -e 's/\t/` `/g' | cut -d ':' -f 2 |xargs | sed -e 's/$/ |/g'
done
